function promiseApi(fn){
  let obj = {};
  return new Promise((resolve,reject)=>{
    obj = {
      success(res){
        resolve(res)
      },
      fail(err){
        reject(err)
      }
    }
    fn(obj)
  })
}

export default{
  promiseApi
}